package com.moore.service.impl;

import com.moore.bean.Candidate;
import com.moore.dto.ResponseData;
import com.moore.mapper.CandidateMapper;
import com.moore.service.PersonalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonalServiceImpl implements PersonalService {

    @Autowired
    private CandidateMapper candidateMapper;
    //我是大帅哥
    @Override
    public ResponseData getCandidateMessage(Integer candidateId) {
        ResponseData responseData = new ResponseData();
        return responseData.returnObject(candidateMapper.selectById(candidateId));
    }

    @Override
    public ResponseData updateCandidateMessage(Candidate candidate) {
        ResponseData responseData = new ResponseData();
        return responseData.returnState(candidateMapper.updateById(candidate));
    }
}
